package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) throws IOException {
        Scanner scanner =  new Scanner(System.in);
        FileOutputStream fos = new FileOutputStream("notes.txt",true);
        byte[]data = scanner.nextLine().getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        while(true){
            String line = scanner.nextLine();
            if("exit".equals(line)){
                break;
            }

        }
        System.out.println("拜拜");
    }
}
